package com.itqf;

import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/11/9
 * @Time: 下午4:54
 */
public class TestFactoryBean {

    public  static  void  main(String[]args){

        ApplicationContext ac = new ClassPathXmlApplicationContext("spring-mybatis.xml");

        //org.apache.ibatis.session.defaults.DefaultSqlSessionFactory@35a50a4c
        System.out.println(ac.getBean("sqlSessionFactory"));
        SqlSessionFactory mySqlSessionFactoryBean = (SqlSessionFactory) ac.getBean("sqlSessionFactory");

    }

}
